/**
 *    Copyright 2014 all reserved by Ihome corporate, any persons
 *    or corporates must not use this code for business purpose before
 *    permission is gained.
 *  
 *    ******                              ******
 *    ******   Love Home       ******
 *    ******                              ******
 *    
 *    Author: DMF
 *    Create Date: Feb 26, 2014
 *
 */
package com.java2.util;

import java.util.Iterator;
import java.util.Random;
import java.util.Stack;

public class CommonTest {
         public static void main(String[] args){
        	  Thread t1 = new Thread(new Runnable(){
        		  public void run(){
        			    try {
        			    	while(true){
	        			    	 System.out.println("t1--->"+new Random().nextInt());
								Thread.sleep(3000);
        			    	}
						} catch (InterruptedException e) {
							// TODO Auto-generated catch block
							e.printStackTrace();
						}
        		  }
        	  });
        	  
        	  Thread t2 = new Thread(new Runnable(){
        		  public void run(){
        			    try {
        			    	while(true){
	        			    	 System.out.println("t2--->"+new Random().nextInt());
								Thread.sleep(2000);
        			    	}
						} catch (InterruptedException e) {
							// TODO Auto-generated catch block
							e.printStackTrace();
						}
        		  }
        	  });
        	  
        	  t1.start();
        	  t2.start();
         }
}
